package edu.ynu.onlinesqltool.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import edu.ynu.onlinesqltool.dao.TableDao;

public class ShowTableAction implements IAction {

	public void execute(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		List tables = TableDao.ShowTable();
		req.setAttribute("tables", tables);
		RequestDispatcher dispater=req.getRequestDispatcher("/tablelist.jsp");
		dispater.forward(req,resp);
	}

}
